package models

import (
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/config"
	"github.com/astaxie/beego/logs"
	"github.com/astaxie/beego/orm"
	"time"
)

type AuthTokenInfo struct {
	Id             int64  `orm:"pk;auto;column(id)"`
	AccessToken    string `orm:"type(text);column(access_token)"`
	TokenType      string `orm:"size(128);column(token_type)"`
	ExpiresIn      int64  `orm:"colnum(expires_in)"`
	RefreshToken   string `orm:"type(text);column(refresh_token)"`
	OrganizationID int8   `orm:"default(1);column(organizate_id)" description:"默认值为:1,1:来源openEuler;2:来源opengauss;3:来源mindspore;4:来源openLooKeng"`
	EnId           int64  `orm:"column(enterprises_id);unique"`
	Scope          string `orm:"type(text);column(scope)"`
	CreatedAt      int64  `orm:"colnum(created_at)"`
	CreateTime     string `orm:"size(32);column(create_time);"`
	UpdateTime     string `orm:"size(32);column(update_time);null"`
	DeleteTime     string `orm:"size(32);column(delete_time);null"`
}

type IpWhite struct {
	IPId        int    `orm:"pk;auto;column(ip_id)"`
	MachineName string `orm:"size(128);column(machine_name)" description:"机器名称"`
	MachineIp   string `orm:"size(128);column(machine_ip);index" description:"机器ip"`
	AccessCount int64  `orm:"default(0);column(access_count)" description:"0: 不受限制; 10000:可以连续访问次数"`
}

type OtherUser struct {
	UerId          int       `orm:"pk;auto;column(user_id)"`
	UserName       string    `orm:"size(64);column(user_name)"`
	PassWord       string    `orm:"size(256);column(pass_word)"`
	AesKey         string    `orm:"size(512);colnum(aes_key)"`
	ExpirationTime string    `orm:"size(32);column(expiration_time)" description:"token的过期时间"`
	CreateTime     time.Time `orm:"auto_now;type(datetime);column(create_time)"`
	UpdateTime     time.Time `orm:"auto_now;type(datetime);column(update_time)"`
	DeleteTime     time.Time `orm:"auto_now;type(datetime);column(delete_time)"`
}

type AdminUser struct {
	UerId      int       `orm:"pk;auto;column(user_id)"` // 自增的值
	UserName   string    `orm:"size(64);column(user_name)"`
	PassWord   string    `orm:"size(256);column(pass_word)"`
	CreateTime time.Time `orm:"auto_now;type(datetime);column(create_time)"`
}

type VulnCenter struct {
	CveId       int64  `orm:"pk;auto;column(cve_id)"`
	CveNum      string `orm:"size(256);column(cve_num);index" description:"cve编号"`
	Description string `orm:"type(text);column(cve_desc)" description:"cve描述"`
	CveLevel    string `orm:"size(32);column(cve_level)" description:"nvd 致命(Critical);严重(High);中等(Medium);一般(Low);其他"`
	Status int8 `orm:"default(0);column(cve_status)" description:"0:cve新增;1:数据已变化；2：已创建issue; 3: 数据创建失败; 4:不符合创建issue条件数据(cve年份不符合要求);
									5:issue已经创建过，不符合要求，不处理;6:字段为空(评分,描述等);7:issue已被删除不再创建;8:分支和版本信息不想符合"`
	CveVersion     string    `orm:"size(512);column(cve_version)" description:"cve归属版本,版本合并"`
	RepairTime     string    `orm:"size(32);column(repair_time)" description:"cve修复时间"`
	FirstPerTime   string    `orm:"size(32);column(first_per_time)" description:"cve首次披露时间"`
	FirstGetTime   string    `orm:"size(32);column(first_get_time)" description:"cve受影响后首次感知时间"`
	PackName       string    `orm:"size(512);column(pack_name)" description:"cve对应得包名称的仓库名称"`
	RepoName       string    `orm:"size(512);column(repo_name)" description:"cve对应得包名称的组件名称"`
	CveUrl         string    `orm:"type(text);column(cve_url)" description:"cve下载链接"`
	IsExport       int8      `orm:"default(0);column(is_export)" description:"0:数据初始化;1:数据已同步到官网；2：数据不需要同步到官网；3：issue已关闭需要同步到官网"`
	DataSource     int8      `orm:"default(1);column(data_source)" description:"1:软件所提供;2:网络爬取；3:人工处理; 4:兼容之前的数据"`
	CveDetailUrl   string    `orm:"type(text);column(cve_detail_url)" description:"cve详情链接"`
	OrganizationID int8      `orm:"default(1);column(organizate_id)" description:"默认值为:1,1:来源openEuler;2:来源opengauss;3:来源mindspore;4:来源openLooKeng"`
	CreateTime     time.Time `orm:"auto_now_add;type(datetime);column(create_time)"`
	UpdateTime     time.Time `orm:"auto_now;type(datetime);column(update_time)"`
	DeleteTime     time.Time `orm:"auto_now;type(datetime);column(delete_time)"`
}

type OpenEulerSA struct {
	OpenId         int64  `orm:"pk;auto;column(openeuler_id)"`
	CveId          int64  `orm:"index;column(cve_id)"`
	PublicDate     string `orm:"size(16);column(public_date);null" description:"安全公告时间"`
	OpenEulerSANum string `orm:"size(128);column(openeuler_sa_num);unique" description:"安全公告"`
}

type ScoreRecord struct {
	Id          int64     `orm:"pk;auto"`
	CveId       int64     `orm:"index;column(cve_id)"`
	NVDScore    float64   `orm:"digits(10);decimals(1);column(nvd_score)"`
	NvectorVule string    `orm:"size(256);column(n_vector_value)" description:"nvd vector 原始值"`
	Status      int8      `orm:"default(0);column(status)" description:"0:未处理;1:已处理"`
	CreateTime  time.Time `orm:"auto_now_add;type(datetime);column(create_time)"`
}

type Score struct {
	Id                 int64     `orm:"pk;auto"`
	CveId              int64     `orm:"index;column(cve_id)"`
	CveNum             string    `orm:"size(256);column(cve_num)" description:"cve编号"`
	NVDScore           float64   `orm:"digits(10);decimals(1);column(nvd_score)" description:"nvd 评分"`
	OpenEulerScore     float64   `orm:"digits(10);decimals(1);column(openeuler_score)" description:"openeuler评分"`
	NvectorVule        string    `orm:"size(256);column(n_vector_value)" description:"nvd vector 原始值"`
	OvectorVule        string    `orm:"size(256);column(o_vector_value)" description:"openeuler vector 原始值"`
	NattackVector      string    `orm:"size(64);column(n_attack_vector)"`
	NaccessVector      string    `orm:"size(256);column(n_access_vector);null" description:"nvd 2.0 评分向量"`
	OattackVector      string    `orm:"size(64);column(o_attack_vector)"`
	OaccessVector      string    `orm:"size(256);column(o_access_vector);null" description:"nvd 2.0 评分向量"`
	NattackComplexity  string    `orm:"size(64);column(n_attack_complexity)"`
	NaccessComplexity  string    `orm:"size(64);column(n_access_complexity);null"`
	OattackComplexity  string    `orm:"size(64);column(o_attack_complexity)"`
	OaccessComplexity  string    `orm:"size(64);column(o_access_complexity);null"`
	NprivilegeRequired string    `orm:"size(64);column(n_privilege_required)"`
	OprivilegeRequired string    `orm:"size(64);column(o_privilege_required)"`
	NuserInteraction   string    `orm:"size(64);column(n_user_interaction)"`
	OuserInteraction   string    `orm:"size(64);column(o_user_interaction)"`
	Nscope             string    `orm:"size(64);column(n_scope)"`
	Oscope             string    `orm:"size(64);column(o_scope)"`
	Nconfidentiality   string    `orm:"size(64);column(n_confidentiality)"`
	Oconfidentiality   string    `orm:"size(64);column(o_confidentiality)"`
	Nintegrity         string    `orm:"size(64);column(n_integrity)"`
	Ointegrity         string    `orm:"size(64);column(o_integrity)"`
	Navailability      string    `orm:"size(64);column(n_availability)"`
	Oavailability      string    `orm:"size(64);column(o_availability)"`
	Nauthentication    string    `orm:"size(64);column(n_authentication);null"`
	Oauthentication    string    `orm:"size(64);column(o_authentication);null"`
	ScoreType          string    `orm:"size(16);column(score_type)"`
	OpenId             int64     `orm:"unique;column(openeuler_id);null"`
	Nstatus            int8      `orm:"default(0);column(n_score_status)" description:"0:新增评分，无改变；1:修改nvd评分;2:已提交issue；3:已处理"`
	Ostatus            int8      `orm:"default(0);column(o_score_status)" description:"0:新增评分，无改变；1:修改nvd评分；2：修改评分未通过；3：修改评分已通过"`
	CreateTime         time.Time `orm:"auto_now_add;type(datetime);column(create_time)"`
	UpdateTime         time.Time `orm:"auto_now;type(datetime);column(update_time)"`
	DeleteTime         time.Time `orm:"auto_now;type(datetime);column(delete_time)"`
}

type SecurityNotice struct {
	SecId              int64     `orm:"pk;auto;column(sec_id)" description:"安全公告"`
	CveId              int64     `orm:"index;column(cve_id)"`
	CveNum             string    `orm:"size(256);column(cve_num)" description:"cve编号"`
	OpenId             int64     `orm:"unique;column(openeuler_id);null" description:"OpenEulerSA"`
	Introduction       string    `orm:"size(256);null;column(introduction)" description:"简介"`
	Summary            string    `orm:"size(256);null;column(summary)" description:"概要"`
	Theme              string    `orm:"type(text);null;column(theme)" description:"主题"`
	Description        string    `orm:"type(text);column(description)" description:"安全公告描述"`
	InfluenceComponent string    `orm:"size(256);null;column(influence_component)" description:"影响组件"`
	AffectProduct      string    `orm:"size(256);null;column(affect_product)" description:"影响产品"`
	ReferenceLink      string    `orm:"type(text);null;column(reference_link)" description:"参考链接"`
	Status             int8      `orm:"default(0);column(sec_status)" description:"0:未发布；1:已发布"`
	AffectStatus       string    `orm:"size(16);null;column(affect_status)" description:"Fixed:已解决；UnFixed:未解决；UnAffected:不影响"`
	CreateTime         time.Time `orm:"auto_now_add;type(datetime);column(create_time)"`
	UpdateTime         time.Time `orm:"auto_now;type(datetime);column(update_time)"`
	DeleteTime         time.Time `orm:"auto_now;type(datetime);column(delete_time)"`
}

type Package struct {
	Id            int64  `orm:"pk;auto"`
	SecId         int64  `orm:"index;column(sec_id)"`
	PackName      string `orm:"type(text);null;column(pack_name)" description:"包名"`
	PackUrl       string `orm:"type(text);null;column(pack_url)" description:"包下载链接"`
	AffectProduct string `orm:"size(256);null;column(affect_product)" description:"影响产品"`
	Source        string `orm:"size(128);null;column(source)" description:"数据源"`
}

type IssueTemplate struct {
	TemplateId        int64     `orm:"pk;auto;column(template_id)"`
	CveId             int64     `orm:"index;column(cve_id)"`
	CveNum            string    `orm:"size(256);column(cve_num)" description:"cve编号"`
	OwnedComponent    string    `orm:"size(512);column(owned_component)" description:"漏洞归属组件"`
	OwnedVersion      string    `orm:"size(512);column(owned_version)" description:"漏洞归属版本"`
	NVDScore          float64   `orm:"digits(10);decimals(1);column(nvd_score)" description:"nvd评分"`
	OpenEulerScore    float64   `orm:"digits(10);decimals(1);column(openeuler_score)" description:"openeuler评分"`
	NVDVector         string    `orm:"size(256);column(nvd_vector)" description:"nvd评分向量"`
	OpenEulerVector   string    `orm:"size(256);column(openeuler_vector)" description:"openeuler评分向量"`
	CveBrief          string    `orm:"type(text);column(cve_brief)" description:"漏洞简述"`
	CveAnalysis       string    `orm:"type(text);column(cve_analysis)" description:"影响性分析说明"`
	PrincipleAnalysis string    `orm:"type(text);column(principle_analysis)" description:"原理分析"`
	AffectedVersion   string    `orm:"size(256);column(affected_version)" description:"受影响的版本"`
	Solution          string    `orm:"type(text);column(solution)" description:"规避方案或消减措施"`
	IssueId           int64     `orm:"column(issue_id)" description:"issue的id"`
	IssueNum          string    `orm:"size(64);column(issue_num)" description:"issue编号"`
	Assignee          string    `orm:"size(128);column(issue_assignee)" description:"issue所属责任人"`
	Status            int8      `orm:"default(1);column(status)" description:"1:待办的；2：进行中；3：已完成；4：已拒绝；5： 已挂起; 6:已删除"`
	StatusName        string    `orm:"size(128);column(status_name)" description:"issue状态名称"`
	IssueStatus       int8      `orm:"default(1);column(issue_status)" description:"1:待分析；2：已正常关闭；3：已分析，待修复；4：已修复；5：已发布；6：已异常关闭"`
	IssueLabel        string    `orm:"size(256);column(issue_label)" description:"issue标签, CVE/FIXED, CVE/UNFIXED"`
	MtAuditFlag       int8      `orm:"default(0);column(mt_audit_flag)" description:"maintainer 审核： 0：审核中；1：审核通过；2：审核拒绝"`
	SaAuditFlag       int8      `orm:"default(0);column(sa_audit_flag)" description:"pr审核： 0：审核中；1：审核通过；2：审核拒绝"`
	OpAuditFlag       int8      `orm:"default(0);column(op_audit_flag)" description:"评分审核： 0：审核中；1：审核通过；2：审核拒绝"`
	Owner             string    `orm:"size(128);column(owner)" description:"仓库地址"`
	Repo              string    `orm:"size(512);column(repo)" description:"仓库路径"`
	Title             string    `orm:"size(512);column(title)" description:"issue标题"`
	IssueType         string    `orm:"size(64);column(issue_type)" description:"CVE和安全问题"`
	Collaborators     string    `orm:"size(128);column(collaborators);null" description:"协助者"`
	Milestone         string    `orm:"size(64);column(milestone);null" description:"里程碑序号"`
	Program           string    `orm:"size(64);column(program);null" description:"项目编号"`
	SecurityHole      int8      `orm:"default(0);column(security_hole)" description:"是否是私有issue"`
	CveLevel          string    `orm:"size(32);column(cve_level)" description:"openEuler 致命(Critical);严重(High);中等(Medium);一般(Low);其他"`
	CommentId         int64     `orm:"column(comment_id);null" description:"首条评论id"`
	ErrorDescription  string    `orm:"size(64);column(error_description);null" description:"cve错误信息,cve与当前仓库错误信息保存"`
	SecLink           string    `orm:"size(512);column(sec_link)" description:"sa安全链接"`
	AbiVersion        string    `orm:"size(256);column(abi_version)" description:"修复是否涉及abi变化（是/否）"`
	PlanStarted       string    `orm:"size(64);column(plan_started_at);null" description:"开始日期"`
	Deadline          string    `orm:"size(64);column(deadline);null" description:"截止日期"`
	CreateTime        time.Time `orm:"auto_now_add;type(datetime);column(create_time)"`
	UpdateTime        time.Time `orm:"auto_now;type(datetime);column(update_time)"`
	DeleteTime        time.Time `orm:"auto_now;type(datetime);column(delete_time)"`
}

type IssueTemplateAssociation struct {
	AssId          int64  `orm:"pk;auto;column(ass_id)"`
	TemplateId     int64  `orm:"unique;column(template_id)"`
	SaReleaseTime  string `orm:"size(32);column(sa_release_time);null"`
	RpmReleaseTime string `orm:"size(32);column(rpm_release_time);null"`
}

type IssueHooks struct {
	Id                int64  `orm:"pk;auto"`
	CveId             int64  `orm:"index;column(cve_id)"`
	IssueId           int64  `orm:"column(issue_id)" description:"issue的id"`
	IssueNum          string `orm:"size(64);column(issue_num);index" description:"issue编号"`
	HookId            int64  `orm:"column(hook_id)" decrtiption:"钩子id"`
	Owner             string `orm:"size(128);column(owner)" description:"仓库地址"`
	Repo              string `orm:"size(128);column(repo)" description:"仓库路径"`
	HookUrl           string `orm:"size(512);column(hook_url)" description:"回调地址"`
	PushEvent         int8   `orm:"column(push_event);default(1)" description:"Push代码到仓库; 默认1：已监听; 0: 未监听"`
	TagPushEvent      int8   `orm:"column(tag_push_events);default(1)" description:"提交Tag到仓库, 默认1：已监听; 0: 未监听"`
	IssueEvent        int8   `orm:"column(issues_events);default(1)" description:"创建/关闭Issue, 默认1：已监听; 0: 未监听"`
	NoteEvent         int8   `orm:"column(note_events);default(1)" description:"评论了Issue/代码等等, 默认1：已监听; 0: 未监听"`
	MergeRequestEvent int8   `orm:"column(merge_requests_events);default(1)" description:"合并请求和合并后, 默认1：已监听; 0: 未监听"`
	Status            int8   `orm:"default(1);column(status)" description:"1:有效; 2:无效"`
	CreateTime        string `orm:"size(32);column(create_time)"`
	UpdateTime        string `orm:"size(32);column(update_time);null"`
	DeleteTime        string `orm:"size(32);column(delete_time);null"`
}

type GitPackageTable struct {
	TableId   int64  `orm:"pk;auto;column(table_id)"`
	TableName string `orm:"size(128);column(table_name)" description:"数据库pkginfo下的表名，如：mainline, bringInRely"`
	Brands    string `orm:"size(256);column(brands)" description:"对应分支信息"`
}

type GitOpenEuler struct {
	GitId             int64     `orm:"pk;auto;column(git_id)"`
	PackageId         int64     `orm:"index;column(package_id)" description:"获取到的包id"`
	PackageName       string    `orm:"column(package_name);size(256)" description:"包名称"`
	Version           string    `orm:"size(64);column(version);index" description:"版本号"`
	Release           string    `orm:"size(128);column(releases)" description:"releases 版本号"`
	OriginUrl         string    `orm:"size(512);column(origin_url)" description:"gitee上的地址"`
	License           string    `orm:"type(text);column(license)" description:"license"`
	Feature           string    `orm:"size(128);column(feature)" description:"特性"`
	MainTainer        string    `orm:"size(128);column(main_tainer)" description:"维护人"`
	MainTainLevel     int8      `orm:"column(main_tain_level);default(1)" description:"软件包维护级别"`
	ReleaseTime       string    `orm:"size(32);column(release_time)" description:"当前版本发布时间"`
	UsedTime          string    `orm:"size(32);column(used_time)" description:"当天减去所用版本的发布日期"`
	LatestVersion     string    `orm:"size(128);column(latest_version)" description:"最新版本号"`
	LatestVersionTime string    `orm:"size(32);column(latest_version_time)" description:"最新版本发布时间"`
	IssueCount        int64     `orm:"column(issue_count);default(0)" description:"该软件包仓库下的issue总数"`
	TableId           int64     `orm:"index;column(table_id)" description:"表id, 外键"`
	TableName         string    `orm:"size(128);column(table_name)" description:"数据库pkginfo下的表名，如：mainline, bringInRely"`
	CpePackName       string    `orm:"size(512);column(cpe_packname);null" description:"openEuler对应的cpe包名称(或者影响的包名)"`
	Status            int8      `orm:"default(0);column(status)" description:"0: 代表新数据; 1:已推送; 2:代表已废弃"`
	CreateTime        time.Time `orm:"auto_now_add;type(datetime);column(create_time)"`
	UpdateTime        time.Time `orm:"auto_now;type(datetime);column(update_time)"`
	DeleteTime        time.Time `orm:"auto_now;type(datetime);column(delete_time)"`
}

type GitOpenEulerTableRelate struct {
	RelateId  int64  `orm:"pk;auto;column(relate_id)"`
	GitId     int64  `orm:"index;column(git_id)" description:"GitOpenEuler，外键"`
	Brands    string `orm:"size(256);column(brands)" description:"对应分支信息"`
	TableName string `orm:"size(256);column(table_name)" description:"数据库pkginfo下的表名，如：mainline, bringInRely"`
}

type GitPackageInfo struct {
	DetailId      int64     `orm:"pk;auto;column(detail_id)"`
	GitId         int64     `orm:"index;column(git_id)" description:"包id，外键"`
	Ids           int64     `orm:"index;column(git_ids)" description:"原始数据id来源"`
	PackageName   string    `orm:"column(package_name);size(256)" description:"包名称"`
	Version       string    `orm:"size(64);column(version);index" description:"版本号"`
	Release       string    `orm:"size(128);column(release)" description:"release 版本号"`
	OriginUrl     string    `orm:"size(512);column(origin_url)" description:"上游社区链接"`
	License       string    `orm:"type(text);column(license)" description:"license"`
	Feature       string    `orm:"size(128);column(feature)" description:"特性"`
	MainTainer    string    `orm:"size(128);column(main_tainer)" description:"维护人"`
	MainTainLevel int8      `orm:"column(main_tain_level);default(1)" description:"软件包维护级别"`
	GitUrl        string    `orm:"size(512);column(git_url)" description:"gitee上的地址"`
	Summary       string    `orm:"type(text);column(summary)" description:"summary"`
	Decription    string    `orm:"type(text);column(decription)" description:"decription"`
	BuildRequired string    `orm:"type(text);column(build_require)" description:"源码包的编译依赖"`
	Status        int8      `orm:"default(0);column(status)" description:"0: 代表新数据; 1:已推送; 2:代表已废弃"`
	CreateTime    time.Time `orm:"auto_now_add;type(datetime);column(create_time)"`
	UpdateTime    time.Time `orm:"auto_now;type(datetime);column(update_time)"`
	DeleteTime    time.Time `orm:"auto_now;type(datetime);column(delete_time)"`
}

type GitSubPack struct {
	SubId       int64  `orm:"pk;auto;column(sub_id)"`
	DetailId    int64  `orm:"index;column(detail_id)" description:"包id，外键"`
	Ids         int64  `orm:"index;column(ids)" description:"原始数据id来源"`
	SubPackName string `orm:"size(256);column(sub_pack_name)" description:"二进制包名"`
}

type GitSubPackRequire struct {
	RequireId   int64  `orm:"pk;auto;column(require_id)"`
	SubId       int64  `orm:"index;column(sub_id)" description:"包id,外键"`
	Ids         int64  `orm:"index;column(ids)" description:"原始数据id来源"`
	RequireName string `orm:"size(256);column(require_name)" description:"二进制包名"`
	Providedby  string `orm:"type(text);column(providedb)" description:"提供该组件的二进制包"`
}

type GitSubPackProvides struct {
	ProvideId   int64  `orm:"pk;auto;column(provide_id)"`
	SubId       int64  `orm:"index;column(sub_id)" description:"包id，外键"`
	Ids         int64  `orm:"index;column(ids)" description:"原始数据id来源"`
	ProvideName string `orm:"size(256);column(provide_name)" description:"依赖的组件名称"`
	Requiredby  string `orm:"size(256);column(requiredb)" description:"依赖该组件的二进制包列表"`
}

type GitSubPackRequiredby struct {
	Id         int64  `orm:"pk;auto;column(id)"`
	ProvideId  int64  `orm:"index;column(provide_id)" description:" 包id，外键"`
	Requiredby string `orm:"size(256);column(requiredb)" description:"依赖该组件的二进制包列表"`
}

type OriginUpstream struct {
	CveId         int64  `orm:"pk;auto;column(cve_id)"`
	Ids           string `orm:"size(256);column(cve_un_ids);unique" description:" 唯一编号,根据此字段去重数据, 唯一识别码，可以填cve编号"`
	CveNum        string `orm:"size(256);column(cve_num);index" description:"cve编号"`
	UpdateType    string `orm:"size(32);column(update_type);" description:"数据上传类型：insert, update, delete"`
	CvePackName   string `orm:"size(512);column(cve_packname);null" description:"Cve在上游对应的包名"`
	PackName      string `orm:"size(512);column(git_packname);index;null" description:"Cve对应的openEuler包名称(或者影响的包名)"`
	Title         string `orm:"type(text);column(cve_title);null" description:"标题"`
	AffectProduct string `orm:"size(512);column(affect_porduct);null" description:"Cve影响的组件, 对应"`
	CnnvdID       string `orm:"size(256);column(cnnvd_id);null" description:"Cnnvd_id"`
	CnvdID        string `orm:"size(256);column(cnvd_id);null" description:"Cnvd_id"`
	PublishedDate string `orm:"size(32);column(published_date);null" description:"漏洞发布日期"`
	FirstPerTime  string `orm:"size(32);column(first_per_time)" description:"cve首次披露时间"`
	FirstGetTime  string `orm:"size(32);column(first_get_time)" description:"cve受影响后首次感知时间"`
	VulStatus     string `orm:"size(64);column(vul_status);null" description:"漏洞状态，REJECT, DISPUTED"`
	Status        int8   `orm:"default(0);column(cve_status)" description:"0:cve新增;1:数据已变化；2：数据已处理；3：错误数据；4：版本信息错误；5：cve年份不符合要求;6:低可信度数据已发邮件"`
	AffectedScope string `orm:"size(512);column(affected_scope);null" description:"影响范围推理"`
	Version       string `orm:"size(64);column(version);index" description:"包对应的版本号"`
	AttackLink    string `orm:"size(512);column(attack_link);null" description:"攻击链路推理"`
	IsExit        int8   `orm:"default(1);column(is_exit)" description:"1: 当前包对应在src-openEuler有对应仓库; 0: 无;2:临时值"`
	Credibility int `orm:"default(0);column(credibility_level)" description:"0:包名、版本号都是漏洞库原始数据;
																			1:包名通过别名匹配、版本号为漏洞库原始数据;
																			2:包名版本号都通过漏洞描述获取;
																			3:包名通过漏洞描述获取并通过别名匹配、版本号为漏洞描述获取;
																			4:包名版本号通过SA获取、版本号为修复版本号、修复版本以下都视为受影响版本;
																			5:包名版本号通过SA获取并通过别名匹配、版本号为修复版本号、修复版本以下都视为受影响版本;
																			6:版本号未匹配、包名通过以上任意方式匹配、可信度最低"`
	CreateTime string `orm:"size(32);column(create_time)"`
	UpdateTime string `orm:"size(32);column(update_time);null"`
	DeleteTime string `orm:"size(32);column(delete_time);null"`
}

type OriginUpstreamDesc struct {
	DescId        int64  `orm:"pk;auto;column(desc_id)"`
	CveId         int64  `orm:"index;column(cve_id)" description:"OriginUpstream 外键"`
	EnDescription string `orm:"type(text);column(en_desc);null" description:"cve英文描述"`
	ZhDescription string `orm:"type(text);column(zh_desc);null" description:"cve中文描述"`
}

type OriginUpstreamConfig struct {
	ConfId int64  `orm:"pk;auto;column(conf_id)"`
	CveId  int64  `orm:"index;column(cve_id)" description:"OriginUpstream 外键"`
	Nodes  string `orm:"size(32);column(nodes);null" description:"nodes数组"`
}

type OriginUpstreamConfigNode struct {
	NodeId   int64  `orm:"pk;auto;column(node_id)"`
	ConfId   int64  `orm:"index;column(conf_id)" description:"OriginUpstreamConfig 外键"`
	Operator string `orm:"size(256);column(operator);null" description:"operator"`
}

type SecurityReviewer struct {
	Id        int64  `orm:"pk;auto"`
	NameSpace string `orm:"unique" description:"码云空间地址"`
	Status    int8   `orm:"default(0);column(status)" description:"0: 全部；1:审核人"`
}

type IssueAssignee struct {
	Id       int64  `orm:"pk;auto"`
	Assignee string `orm:"unique" description:"码云空间地址"`
}

type OriginUpstreamConfigNodeCpe struct {
	CpeId          int64  `orm:"pk;auto;column(cpe_id)"`
	NodeId         int64  `orm:"index;column(node_id)" description:"OriginUpstreamConfigNode 外键"`
	Cpe23Uri       string `orm:"type(text);column(cpe_uri);null" description:"cpe"`
	CpeMatchString string `orm:"type(text);column(cpe_match);null" description:"过滤字符串"`
	Vulnerable     string `orm:"size(64);column(vulner_able);null" description:"易受攻击"`
}

type OriginUpstreamImpact struct {
	ImpactId int64  `orm:"pk;auto;column(impact_id)"`
	CveId    int64  `orm:"index;column(cve_id)" description:"OriginUpstream 外键"`
	Impact   string `orm:"size(32);column(impact);null" description:"包含v2,v3评分数据"`
}

type OriginUpstreamImpactScore struct {
	ScoreId      int64 `orm:"pk;auto;column(score_id)"`
	ImpactId     int64 `orm:"index;column(impact_id)" description:"OriginUpstreamImpact 外键"`
	BaseMetricV3 int8  `orm:"column(base_met_v3);null" description:"v3评分存在为：1; 0:不存在"`
	BaseMetricV2 int8  `orm:"column(base_met_v2);null" description:"v2评分存在为：1; 0:不存在"`
	CvssV3       int8  `orm:"column(cvss_v3);null" description:"v3评分存在为：1; 0:不存在"`
	CvssV2       int8  `orm:"column(cvss_v2);null" description:"v2评分存在为：1; 0:不存在"`
	Status       int8  `orm:"default(1);column(score_status);null" description:"1:未处理；2：已处理；3：已修改"`
}

type OriginUpstreamImpactScoreV3 struct {
	V3Id                  int64   `orm:"pk;auto;column(v3_id)"`
	ScoreId               int64   `orm:"index;column(score_id)" description:"OriginUpstreamImpactScore 外键"`
	BaseScore             float64 `orm:"digits(10);decimals(1);column(base_score);null" description:"nvd 基准分"`
	VectorString          string  `orm:"size(256);column(vector_value);null" description:"nvd vector 评分向量值"`
	AttackComplexity      string  `orm:"size(64);column(attack_complexity);null" description:"攻击复杂性"`
	AttackVector          string  `orm:"size(64);column(attack_vector);null" description:"攻击目标"`
	AvailabilityImpact    string  `orm:"size(64);column(availability_impact);null" description:"可用性影响"`
	BaseSeverity          string  `orm:"size(64);column(base_severity);null" description:"严重程度"`
	UserInteraction       string  `orm:"size(64);column(user_interaction);null" description:"用户交互"`
	PrivilegesRequired    string  `orm:"size(64);column(privilege_required);null" description:"所需特权"`
	Version               string  `orm:"size(64);column(version);null" description:"Cvss版本"`
	ConfidentialityImpact string  `orm:"size(64);column(confidentiality_impact);null" description:"可信性影响"`
	IntegrityImpact       string  `orm:"size(64);column(integrity_impact);null" description:"完整性影响"`
	Scope                 string  `orm:"size(64);column(scope);null" description:"范围"`
	ImpactScore           float64 `orm:"digits(10);decimals(1);column(impact_score);null" description:"nvd 影响评分"`
	ExploitabilityScore   float64 `orm:"digits(10);decimals(1);column(exploitability_score);null" description:"nvd 可利用性评分"`
	CveLevel              string  `orm:"size(32);column(cve_level);null" description:"致命(Critical) >= 9.0;严重(High)>=7.0&&<=8.9;中等(Medium)>4.0 && <=6.9;一般(Low)<=4.0;其他"`
}

type OriginUpstreamImpactScoreV2 struct {
	V2Id                    int64   `orm:"pk;auto;column(v2_id)"`
	ScoreId                 int64   `orm:"index;column(score_id)" description:"OriginUpstreamImpactScore 外键"`
	AcInsufInfo             string  `orm:"size(64);column(acinsuf_info);null" description:"nvd vector 原始值"`
	BaseScore               float64 `orm:"digits(10);decimals(1);column(base_score);null" description:"nvd 基准分"`
	VectorString            string  `orm:"size(256);column(vector_value);null" description:"nvd vector 评分向量值"`
	AccessComplexity        string  `orm:"size(64);column(access_complexity);null" description:"攻击复杂性"`
	Authentication          string  `orm:"size(64);column(authentication);null" description:"身份认证"`
	AvailabilityImpact      string  `orm:"size(64);column(availability_impact);null" description:"可用性影响"`
	Version                 string  `orm:"size(64);column(version);null" description:"Cvss版本"`
	ConfidentialityImpact   string  `orm:"size(64);column(confidentiality_impact);null" description:"可信性影响"`
	IntegrityImpact         string  `orm:"size(64);column(integrity_impact);null" description:"完整性影响"`
	AccessVector            string  `orm:"size(64);column(access_vector);null" description:"攻击目标"`
	UserInteractionRequired string  `orm:"size(64);column(user_interaction_required);null" description:"需要用户交互"`
	Severity                string  `orm:"size(64);column(severity);null" description:"严重程度"`
	ObtainUserPrivilege     string  `orm:"size(64);column(obtain_user_privilege);null" description:"获取用户特权"`
	ObtainAllPrivilege      string  `orm:"size(64);column(obtain_all_privilege);null" description:"获取所有特权"`
	ObtainOtherPrivilege    string  `orm:"size(64);column(obtain_other_privilege);null" description:"获取其他特权"`
	ImpactScore             float64 `orm:"digits(10);decimals(1);column(impact_score);null" description:"nvd 影响评分"`
	ExploitabilityScore     float64 `orm:"digits(10);decimals(1);column(exploitability_score);null" description:"nvd 可利用性评分"`
	CveLevel                string  `orm:"size(32);column(cve_level);null" description:"致命(Critical) >= 9.0;严重(High)>=7.0&&<=8.9;中等(Medium)>4.0 && <=6.9;一般(Low)<=4.0;其他"`
}

type OriginUpstreamPoc struct {
	PocId   int64  `orm:"pk;auto;column(poc_id)"`
	CveId   int64  `orm:"index;column(cve_id)" description:"OriginUpstream 外键"`
	Source  string `orm:"size(512);column(source);null" description:"来源"`
	Date    string `orm:"size(32);column(date);null" description:"日期"`
	Path    string `orm:"size(512);column(path);null" description:"文件路径"`
	Dbindex string `orm:"size(512);column(dbindex);null" description:"数据库索引"`
	Url     string `orm:"size(512);column(url);null" description:"下载链接"`
	Desc    string `orm:"type(text);column(desc);null" description:"说明"`
}

type OriginUpstreamEvent struct {
	EventId     int64  `orm:"pk;auto;column(event_id)"`
	CveId       int64  `orm:"index;column(cve_id)" description:"OriginUpstream 外键"`
	Title       string `orm:"size(512);column(title);null" description:"标题"`
	Date        string `orm:"size(32);column(date);null" description:"日期"`
	Url         string `orm:"size(512);column(url);null" description:"连接"`
	Description string `orm:"type(text);column(description);null" description:"说明"`
}

type OriginUpstreamReference struct {
	RefId     int64  `orm:"pk;auto;column(ref_id)"`
	CveId     int64  `orm:"index;column(cve_id)" description:"OriginUpstream 外键"`
	Name      string `orm:"size(512);column(name);null" description:"名称"`
	Refsource string `orm:"size(512);column(refsource);null" description:"参考来源"`
	Url       string `orm:"size(512);column(url);null" description:"链接"`
	Tags      string `orm:"type(text);column(tags);null" description:"tags"`
}

type OriginUpstreamVulType struct {
	VulId  int64  `orm:"pk;auto;column(vul_id)"`
	CveId  int64  `orm:"index;column(cve_id)" description:"OriginUpstream 外键"`
	Cwe    string `orm:"size(256);column(cwe);null" description:"Cwe编号"`
	EnDesc string `orm:"type(text);column(en_desc);null" description:"英文描述"`
	ZhDesc string `orm:"type(text);column(zh_desc);null" description:"中文描述"`
}

type OriginUpstreamFixSuggest struct {
	FixId  int64  `orm:"pk;auto;column(fix_id)"`
	CveId  int64  `orm:"index;column(cve_id)" description:"OriginUpstream 外键"`
	Detail string `orm:"type(text);column(detail);null" description:"细节"`
}

type OriginUpstreamFixSuggestRef struct {
	FixRefId  int64  `orm:"pk;auto;column(fix_ref_id)"`
	FixId     int64  `orm:"index;column(fix_id)" description:"OriginUpstreamFixSuggest 外键"`
	Refsource string `orm:"size(512);column(refsource);null" description:"参考文献，包含以下内容"`
	Url       string `orm:"type(text);column(url);null" description:"链接"`
	Name      string `orm:"type(text);column(name);null" description:"名称"`
}

type OriginUpstreamFixSuggestRefTag struct {
	TagId    int64  `orm:"pk;auto;column(tag_id)"`
	FixRefId int64  `orm:"index;column(fix_ref_id)" description:"OriginUpstreamFixSuggestRef 外键"`
	Name     string `orm:"size(512);column(name);null" description:"名称"`
}

//GiteOriginIssue Issues that already exist on Code Cloud
type GiteOriginIssue struct {
	Id             int64     `orm:"pk;auto"`
	IssueId        int64     `json:"issue_id" orm:"unique"`
	Url            string    ` description:"issue gitee 链接"`
	Number         string    `orm:"size(50);unique" description:"issue 编号"`
	State          string    `orm:"size(50)" description:"issue 状态"`
	Title          string    `orm:"null" description:"issue 标题"`
	CveNumber      string    `json:"cve_number" description:"CVE 编号"`
	Body           string    `orm:"null;type(text)" description:"issue 主体"`
	IssueCreate    string    `json:"issue_create" description:"issue 创建者"`
	IssueAssignee  string    `json:"issue_assignee" orm:"null" description:"issue 责任人"`
	RepoPath       string    `json:"repo_path" description:"仓库空间地址"`
	RepoUrl        string    `json:"repo_url" description:"仓库码云地址链接"`
	IssueType      string    `json:"issue_type" description:"issue 类型"`
	IssueExistTpl  bool      `json:"issue_exist_tpl" description:"此 issue 是否有对应的模板"`
	SecurityHole   bool      `json:"security_hole" description:"是否为安全漏洞"`
	Status         int8      `orm:"default(0);column(proc_status)" description:"0:cve新增;1:数据已变化；2：数据已处理；3：数据错误"`
	IssueCreateAt  time.Time `json:"issue_create_at" orm:"null" description:"issue 创建的时间"`
	IssueUpdateAt  time.Time `json:"issue_update_at" orm:"null" description:"issue 更新的时间"`
	IssueFinishAt  time.Time `json:"issue_finish_at" orm:"null" description:"issue 关闭的时间"`
	GrabTime       time.Time `json:"grab_time" orm:"auto_now;type(datetime)" description:"记录当前issue抓取的时间"`
	InfProduct     string    `json:"inf_product" orm:"null" description:"受影响的产品"` //受影响的产品
	RepoDesc       string    `json:"repo_desc" orm:"null;size(2048)" description:"cve 对组件的描述"`
	IssueState     string    `orm:"size(50);column(issue_state)" description:"issue 中文状态"`
	Owner          string    `orm:"size(256);column(owner);default(src-openeuler)" description:"issue所属社区"`
	OrganizationID int8      `orm:"default(1);column(organizate_id)" description:"默认值为:1,1:来源src-openEuler;2:来源opengauss;3:来源mindspore;4:来源openLooKeng"`
}

type OriginExcel struct {
	CveId             int64   `orm:"pk;auto;column(cve_id)"`
	CveNum            string  `orm:"size(256);column(cve_num)" description:"cve编号"`
	CveUrl            string  `orm:"type(text);column(cve_url);null" description:"cve下载链接"`
	CveVersion        string  `orm:"size(256);column(cve_version);null" description:"漏洞归属版本"`
	PackName          string  `orm:"size(256);column(pack_name);null" description:"包名"`
	ScoreType         string  `orm:"size(16);column(score_type);null" description:"评分类型：v3"`
	NVDScore          float64 `orm:"digits(10);decimals(1);column(nvd_score);null" description:"nvd评分"`
	CveLevel          string  `orm:"size(32);column(cve_level);null" description:"致命(Critical);严重(High);中等(Medium);一般(Low);其他"`
	CveDesc           string  `orm:"type(text);column(cve_desc);null" description:"漏洞简述"`
	RepairTime        string  `orm:"size(32);column(repair_time);null" description:"cve发布时间"`
	NVDVector         string  `orm:"size(256);column(vector_value);null" description:"nvd 评分向量"`
	AttackVector      string  `orm:"size(256);column(attack_vector);null" description:"nvd 3.0评分"`
	AccessVector      string  `orm:"size(256);column(access_vector);null" description:"nvd 2.0 评分"`
	AttackComplexity  string  `orm:"size(64);column(attack_complexity);null"`
	AccessComplexity  string  `orm:"size(64);column(access_complexity);null"`
	PrivilegeRequired string  `orm:"size(64);column(privilege_required);null"`
	UserInteraction   string  `orm:"size(64);column(user_interaction);null"`
	Scope             string  `orm:"size(64);column(scope);null"`
	Confidentiality   string  `orm:"size(64);column(confidentiality);null"`
	Integrity         string  `orm:"size(64);column(integrity);null"`
	Availability      string  `orm:"size(64);column(availability);null"`
	Authentication    string  `orm:"size(64);column(authentication);null"`
	CveStatus         int8    `orm:"default(0);column(cve_status);null" description:"0:未处理;1:已修改；2：已处理; 3: 数据错误，不做处理; 4: 版本信息错误; 6: cve已经生成过issue; 7:cve年限不对"`
	IsExport          int8    `orm:"default(1);column(is_export);null" description:"1: 未导出; 2: 已导出"`
	CreateTime        string  `orm:"type(datetime);column(create_time);null"`
	UpdateTime        string  `orm:"type(datetime);column(update_time);null"`
	DeleteTime        string  `orm:"type(datetime);column(delete_time);null"`
}

type GitRepoGroups struct {
	GroupId   int64  `orm:"pk;auto;column(group_id)"`
	GroupName string `orm:"index"`
}

//GiteRepo Code Cloud repo
type GiteRepo struct {
	RepoId     int64 `orm:"pk;auto;column(repo_id)"`
	GroupId    int64 `orm:"index;column(group_id)" description:"GitRepoGroups 外键"`
	OrgId      int64
	OrgPath    string `orm:"size(128);column(org_path);null" description:"组织名称"`
	Path       string `orm:"size(512);column(path);null" description:"仓库名称"`
	Status     int8   `orm:"default(0);column(status);null" description:"0: 正常;1:已删除"`
	Public     bool
	Private    bool
	Fork       bool
	CreateTime string `orm:"type(datetime);column(create_time);null"`
	UpdateTime string `orm:"type(datetime);column(update_time);null"`
	DeleteTime string `orm:"type(datetime);column(delete_time);null"`
}

//GiteMember Members of Code Cloud repo
type GiteRepoMember struct {
	MemBerId   int64  `orm:"pk;auto;column(repo_id)"`
	GroupId    int64  `orm:"index;column(group_id)" description:"GitRepoGroups 外键"`
	MemberName string `orm:"size(512);column(member_name);null" description:"成员名称"`
	MemberType string `orm:"size(128);column(member_type);null" description:"Maintainer;Committer"`
	CreateTime string `orm:"type(datetime);column(create_time);null"`
	UpdateTime string `orm:"type(datetime);column(update_time);null"`
	DeleteTime string `orm:"type(datetime);column(delete_time);null"`
}

//GiteRepoBranch Code Cloud repo Branch
type GiteRepoBranch struct {
	Id            int64 `orm:"pk;auto"`
	RepoId        int64 `orm:"index;column(repo_id)" description:"GiteRepo 外键"`
	ProtectionUrl string
	Name          string
	Protected     string
}

type ExportRecord struct {
	Id         int64  `orm:"pk;auto"`
	FileName   string `orm:"unique"`
	FileCode   string
	State      int8  ` description:"0:文件生成中;1 文件可下载；2 文件不可下载"`
	CreateTime int64 `orm:"column(create_time)" description:"时间戳"`
}

type PackageCpe struct {
	Id          int64  `orm:"pk;auto"`
	PackName    string `orm:"size(512);column(packname);index;null" description:"Cve对应的openEuler包名称(或者影响的包名)"`
	CpePackName string `orm:"size(512);column(cpe_packname);null" description:"openEuler对应的cpe包名称(或者影响的包名)"`
	CreateTime  string `orm:"size(32);column(create_time);null" description:"createtime"`
}

type EmailList struct {
	Id        int64  `orm:"pk;auto"`
	EmailName string `orm:"size(512);column(email_name);null" description:"收件人名称"`
	EmailType int8   `orm:"index;column(email_type);default(1)" description:"1: excel导出列表"`
}

type IssueRepoWhitelist struct {
	RepoId      int64  `orm:"pk;auto;column(repo_id)"`
	PackageName string `orm:"column(package_name);size(256);index" description:"包名称"`
	Version     string `orm:"size(64);column(version);index" description:"版本号"`
	Branchs     string `orm:"size(512);column(branchs);null" description:"仓库对应的分支"`
	Status      int8   `orm:"default(1);column(status)" description:"1: 新增; 2:删除"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type IssueCreateRecord struct {
	IssueRecordId    int64   `orm:"pk;auto;column(id)"`
	CveId            int64   `orm:"index;column(cve_id)" description:"VulnCenter 外键"`
	CveNum           string  `orm:"size(256);column(cve_num);index" description:"cve编号"`
	Description      string  `orm:"type(text);column(cve_desc)" description:"cve描述"`
	CveLevel         string  `orm:"size(32);column(cve_level)" description:"致命(Critical);严重(High);中等(Medium);一般(Low);其他"`
	Status           int8    `orm:"default(1);column(status)" description:"1:已创建issue；2：未创建issue；3：创建失败; 4: 已导出"`
	CveVersion       string  `orm:"size(128);column(cve_version)" description:"cve归属版本"`
	RepairTime       string  `orm:"size(32);column(repair_time)" description:"cve修复时间"`
	PackName         string  `orm:"size(512);column(pack_name)" description:"cve对应得包名称"`
	NVDScore         float64 `orm:"digits(10);decimals(1);column(nvd_score)" description:"nvd 评分"`
	NvectorVule      string  `orm:"size(256);column(n_vector_value)" description:"nvd vector 原始值"`
	ErrorDescription string  `orm:"type(text);column(error_description);null" description:"创建cve错误信息反馈"`
	CreateTime       string  `orm:"size(32);column(create_time)"`
	UpdateTime       string  `orm:"size(32);column(update_time);null"`
	DeleteTime       string  `orm:"size(32);column(delete_time);null"`
}

type OpenGussYaml struct {
	Id          int64  `orm:"pk;auto"`
	PackageName string `orm:"column(package_name);size(256)" description:"包名称"`
	Repo        string `orm:"column(repo_name);size(256)" description:"仓名称"`
	Version     string `orm:"size(64);column(version);index" description:"版本号"`
	OriginUrl   string `orm:"size(512);column(origin_url)" description:"gitee上的地址"`
	Status      int8   `orm:"default(1);column(status)" description:"1:正常;2:已删除"`
	CpeName     string `orm:"type(text);column(cpe_name)" description:"cpe的名称"`
	MarkBit     int8   `orm:"default(1);column(mark_bit)" description:"1:正常;2:已删除"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type SpecIssueAssigness struct {
	Id          int64  `orm:"pk;auto"`
	PackageName string `orm:"column(package_name);size(256);unique" description:"包名称"`
	Assignee    string `orm:"size(256);column(issue_assignee);" description:"包对应的责任人"`
	Status      int8   `orm:"default(1);column(status)" description:"1:正常;2:已删除"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type SpecError struct {
	Id          int64  `orm:"pk;auto;column(id)"`
	CveNum      string `orm:"size(256);column(cve_num);index" description:"cve编号"`
	Description string `orm:"type(text);column(cve_desc)" description:"cve描述"`
	Owner       string `orm:"size(256);column(cve_owner);index" description:"仓库所在组织"`
	Status      int8   `orm:"default(1);column(cve_status)" description:"1:正常数据;2:已删除"`
	PackName    string `orm:"size(512);column(pack_name)" description:"cve对应得包名称"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type CvrfSaRecord struct {
	Id                 int64  `orm:"pk;auto;column(id)"`
	OpenEulerSANum     string `orm:"size(128);column(openeuler_sa_num);unique" description:"安全公告"`
	PackName           string `orm:"size(512);column(pack_name)" description:"cve对应得包名称"`
	CveNum             string `orm:"type(text);column(cve_num);index" description:"cve编号"`
	XmlContent         string `orm:"type(text);column(xml_content)" description:"xml内容"`
	Md5                string `orm:"size(128);column(cur_md5);unique" description:"当前内容生成的MD5"`
	UpdateMd5          string `orm:"size(128);column(update_md5)" description:"内容更新后生成的MD5"`
	Status             int8   `orm:"default(1);column(cve_status)" description:"1:初始化; 2: 已更新; 3: 已删除"`
	IsExport           int8   `orm:"default(1);column(is_export);null" description:"1: 未导出; 2: 已导出"`
	AffectFlag         int8   `orm:"default(1);column(affect_flag)" description:"1:受影响标识; 2: 不受影响标识; 3: 其他"`
	SortOpenEulerSANum string `orm:"size(128);column(sort_openeuler_sa_num);unique" description:"排序后的安全公告"`
	CreateTime         string `orm:"size(32);column(create_time)"`
	UpdateTime         string `orm:"size(32);column(update_time);null"`
	DeleteTime         string `orm:"size(32);column(delete_time);null"`
}

type SaNumber struct {
	SaId           int64  `orm:"pk;auto;column(sa_id)"`
	OpenEulerSANum string `orm:"size(128);column(openeuler_sa_num);unique" description:"安全公告完整编号"`
	SaYears        string `orm:"size(16);column(sa_years);" description:"sa对应的年份"`
	SaNum          int64  `orm:"default(0);column(sa_num)" description:"sa编号"`
	Status         int8   `orm:"default(1);column(status)" description:"1:正常可用;2:已使用"`
	CreateTime     string `orm:"size(32);column(create_time)"`
	UpdateTime     string `orm:"size(32);column(update_time);null"`
	DeleteTime     string `orm:"size(32);column(delete_time);null"`
}

type SaFileList struct {
	FileId     int64  `orm:"pk;auto;column(file_id)"`
	FileName   string `orm:"size(512);column(file_name)" description:"sa的cvrf文件名称"`
	Status     int8   `orm:"default(1);column(status)" description:"1:正常可用;2:已删除"`
	CreateTime string `orm:"size(32);column(create_time)"`
	UpdateTime string `orm:"size(32);column(update_time);null"`
	DeleteTime string `orm:"size(32);column(delete_time);null"`
}

type IssueStatisticsMailList struct {
	Id         int64  `orm:"pk;auto;column(id)"`
	EmailName  string `orm:"size(256);column(email_name);unique" description:"收件人"`
	EmailType  int8   `orm:"default(1);column(email_type)" description:"1:收件人;2:抄送人"`
	CreateTime string `orm:"size(32);column(create_time)"`
	UpdateTime string `orm:"size(32);column(update_time);null"`
	DeleteTime string `orm:"size(32);column(delete_time);null"`
}

type SaFileRecord struct {
	FileId     int64  `orm:"pk;auto;column(file_id)"`
	FileName   string `orm:"size(512);column(file_name)" description:"sa的cvrf文件名称"`
	Status     int8   `orm:"default(1);column(status)" description:"1:正常可用;2:已删除"`
	SaNumber   int64  `orm:"column(sa_number)" description:"当前数字"`
	CreateTime string `orm:"size(32);column(create_time)"`
	UpdateTime string `orm:"size(32);column(update_time);null"`
	DeleteTime string `orm:"size(32);column(delete_time);null"`
}

type OpenGaussSiteList struct {
	GaussId            int64  `orm:"pk;auto;column(gauss_id)"`
	GaussSaNum         string `orm:"size(64);column(gauss_sa_num);unique" description:"opengauss的sa编号"`
	SaNum              int64  `orm:"null;column(sa_num)" description:"sa对应的数据值"`
	Introduction       string `orm:"size(256);null;column(introduction)" description:"简介"`
	CveLevel           string `orm:"size(32);column(cve_level)" description:"致命(Critical);严重(High);中等(Medium);一般(Low);其他"`
	CveLevelValue      int    `orm:"default(0);column(cve_level_value)" desription:"Critical: 1, High: 2, Medium: 3,low: 4"`
	Summary            string `orm:"size(256);null;column(summary)" description:"概要"`
	Theme              string `orm:"type(text);null;column(theme)" description:"主题"`
	Description        string `orm:"size(8192);column(description)" description:"安全公告描述"`
	InfluenceComponent string `orm:"size(256);null;column(influence_component)" description:"影响组件"`
	AffectProduct      string `orm:"size(256);null;column(affect_product)" description:"影响产品"`
	CveNums            string `orm:"type(text);column(cve_nums)" description:"cve编号汇总"`
	ReferenceLink      string `orm:"type(text);null;column(reference_link)" description:"参考链接"`
	PublicDate         string `orm:"size(32);null;column(public_date)" description:"sa发布日期"`
	Status             int8   `orm:"default(1);column(status)" description:"1:正常可用;2:已删除;3:已发布"`
	Years              int    `orm:"null;column(sa_years)" description:"sa 发布年份"`
	CreateTime         string `orm:"size(32);column(create_time)"`
	UpdateTime         string `orm:"size(32);column(update_time);null"`
	DeleteTime         string `orm:"size(32);column(delete_time);null"`
}

type OpenGaussCveList struct {
	Id                 int64   `orm:"pk;auto"`
	GaussId            int64   `orm:"index;column(gauss_id)"`
	CveNum             string  `orm:"size(256);column(cve_num);index" description:"cve编号"`
	Description        string  `orm:"type(text);column(cve_desc)" description:"cve描述"`
	PackName           string  `orm:"size(512);column(pack_name)" description:"cve对应得包名称"`
	RepoName           string  `orm:"size(512);column(repo_name)" description:"cve对应得仓名称"`
	NVDScore           float64 `orm:"digits(10);decimals(1);column(nvd_score)" description:"nvd 评分"`
	OpenEulerScore     float64 `orm:"digits(10);decimals(1);column(openeuler_score)" description:"openeuler评分"`
	NvectorVule        string  `orm:"size(256);column(n_vector_value)" description:"nvd vector 原始值"`
	OvectorVule        string  `orm:"size(256);column(o_vector_value)" description:"openeuler vector 原始值"`
	NattackVector      string  `orm:"size(64);column(n_attack_vector)"`
	NaccessVector      string  `orm:"size(256);column(n_access_vector);null" description:"nvd 2.0 评分向量"`
	OattackVector      string  `orm:"size(64);column(o_attack_vector)"`
	OaccessVector      string  `orm:"size(256);column(o_access_vector);null" description:"nvd 2.0 评分向量"`
	NattackComplexity  string  `orm:"size(64);column(n_attack_complexity)"`
	NaccessComplexity  string  `orm:"size(64);column(n_access_complexity);null"`
	OattackComplexity  string  `orm:"size(64);column(o_attack_complexity)"`
	OaccessComplexity  string  `orm:"size(64);column(o_access_complexity);null"`
	NprivilegeRequired string  `orm:"size(64);column(n_privilege_required)"`
	OprivilegeRequired string  `orm:"size(64);column(o_privilege_required)"`
	NuserInteraction   string  `orm:"size(64);column(n_user_interaction)"`
	OuserInteraction   string  `orm:"size(64);column(o_user_interaction)"`
	Nscope             string  `orm:"size(64);column(n_scope)"`
	Oscope             string  `orm:"size(64);column(o_scope)"`
	Nconfidentiality   string  `orm:"size(64);column(n_confidentiality)"`
	Oconfidentiality   string  `orm:"size(64);column(o_confidentiality)"`
	Nintegrity         string  `orm:"size(64);column(n_integrity)"`
	Ointegrity         string  `orm:"size(64);column(o_integrity)"`
	Navailability      string  `orm:"size(64);column(n_availability)"`
	Oavailability      string  `orm:"size(64);column(o_availability)"`
	Nauthentication    string  `orm:"size(64);column(n_authentication);null"`
	Oauthentication    string  `orm:"size(64);column(o_authentication);null"`
	ScoreType          string  `orm:"size(16);column(score_type)"`
	FixLabel           string  `orm:"size(32);column(fix_label)" description:"issue标签, Fixed, Unaffected"`
	Status             int8    `orm:"default(1);column(status)" description:"1:正常可用(预发布);2:已删除;3:正常发布,数据在官网展示"`
	Years              int     `orm:"null;column(cve_years)" description:"cve 发布年份"`
	CreateTime         string  `orm:"size(32);column(create_time)"`
	UpdateTime         string  `orm:"size(32);column(update_time);null"`
	DeleteTime         string  `orm:"size(32);column(delete_time);null"`
}

type OpenGaussGroup struct {
	GroupId    int64  `orm:"pk;auto;column(group_id)"`
	GroupName  string `orm:"size(64);column(group_name);unique" description:"软件包分类组名称"`
	Status     int8   `orm:"default(1);column(status)" description:"1:正常可用;2:已删除"`
	CreateTime string `orm:"size(32);column(create_time)"`
}

type OpenGaussPackage struct {
	PackId      int64  `orm:"pk;auto;column(pack_id)"`
	GroupId     int64  `orm:"index;column(group_id)"`
	PlatId      int64  `orm:"index;column(plat_id)"`
	GaussId     int64  `orm:"index;column(gauss_id);default(0)" description:"对应sa的表id"`
	PackageName string `orm:"size(512);column(package_name)" description:"cve对应得包名称"`
	RpmName     string `orm:"type(text);column(rpm_name)" description:"tag包名称"`
	ReleaseDate string `orm:"size(32);column(release_date)" description:"版本发布日期"`
	RepoVersion string `orm:"size(32);column(repo_version);" description:"分支版本信息"`
	Status      int8   `orm:"default(1);column(status)" description:"1:正常可用;2:已删除"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type OpenGaussDownloadFile struct {
	FileId      int64  `orm:"pk;auto;column(file_id)"`
	FilePath    string `orm:"size(512);column(file_path);unique" description:"文件下载路径"`
	RepoVersion string `orm:"size(32);column(repo_version);" description:"分支版本信息"`
	Status      int8   `orm:"default(1);column(status)" description:"1:文件待使用;2:文件解析中;3:文件已废弃"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type OpenGaussVersion struct {
	VersionId        int64  `orm:"pk;auto;column(version_id)"`
	CveId            int64  `orm:"index;column(cve_id)"`
	CveNum           string `orm:"size(256);column(cve_num);index" description:"cve编号"`
	AffectStatus     int8   `orm:"default(1);column(affect_status)" description:"1:受影响,Fixed;2:不受影响,Unaffected"`
	AffectStatusName string `orm:"size(32);column(affect_status_name);" description:"是否受影响名称, Fixed, Unaffected"`
	RepoVersion      string `orm:"size(32);column(repo_version);" description:"分支版本信息"`
	ReleaseFlag      int8   `orm:"default(1);column(release_flag)" description:"1: 受影响标识;2:不受影响标识;3:丢弃"`
	CreateTime       string `orm:"size(32);column(create_time)"`
	UpdateTime       string `orm:"size(32);column(update_time);null"`
}

type OpenGaussPlatform struct {
	PlatId     int64  `orm:"pk;auto;column(plat_id)"`
	PlatName   string `orm:"size(64);column(plat_name);unique" description:"软件包平台名称"`
	Status     int8   `orm:"default(1);column(status)" description:"1:正常可用;2:已删除"`
	CreateTime string `orm:"size(32);column(create_time)"`
}

type OpenGaussListTemp struct {
	GaussTempId        int64  `orm:"pk;auto;column(gauss_temp_id)"`
	Introduction       string `orm:"size(256);null;column(introduction)" description:"简介"`
	CveLevel           string `orm:"size(32);column(cve_level)" description:"致命(Critical);严重(High);中等(Medium);一般(Low);其他"`
	CveLevelValue      int    `orm:"default(0);column(cve_level_value)" desription:"Critical: 1, High: 2, Medium: 3,low: 4"`
	Summary            string `orm:"size(256);null;column(summary)" description:"概要"`
	Theme              string `orm:"type(text);null;column(theme)" description:"主题"`
	Description        string `orm:"type(text);column(description)" description:"安全公告描述"`
	InfluenceComponent string `orm:"size(256);null;column(influence_component)" description:"影响组件"`
	AffectProduct      string `orm:"size(256);null;column(affect_product)" description:"影响产品"`
	PublicDate         string `orm:"size(32);null;column(public_date)" description:"sa发布日期"`
	CveNums            string `orm:"type(text);column(cve_nums)" description:"cve编号汇总"`
	Status             int8   `orm:"default(1);column(status)" description:"1:正常可用;2:已删除"`
	CreateTime         string `orm:"size(32);column(create_time)"`
	UpdateTime         string `orm:"size(32);column(update_time);null"`
	DeleteTime         string `orm:"size(32);column(delete_time);null"`
}

type OpenEulerRepoOrigin struct {
	Id          int64  `orm:"pk;auto;column(id)"`
	PackageName string `orm:"column(package_name);size(256)" description:"包名称"`
	Version     string `orm:"size(64);column(version)" description:"版本号"`
	Summary     string `orm:"type(text);column(summary)" description:"简介"`
	Decription  string `orm:"type(text);column(decription)" description:"描述"`
	Branchs     string `orm:"size(512);column(branch)" description:"分支信息"`
	Status      int8   `orm:"default(1);column(status)" description:"1:正常;2:已删除"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
	Repo        string `orm:"column(repo_name);size(256)" description:"仓名称"`
}

type OpenGaussSecurityReviewer struct {
	Id        int64  `orm:"pk;auto"`
	NameSpace string `orm:"unique" description:"码云空间地址"`
	Status    int8   `orm:"default(0);column(status)" description:"0: 全部；1:审核人"`
}

type MindSporeSecurityReviewer struct {
	Id        int64  `orm:"pk;auto"`
	NameSpace string `orm:"unique" description:"码云空间地址"`
	Status    int8   `orm:"default(0);column(status)" description:"0: 全部；1:审核人"`
}

type MindSporeYaml struct {
	Id          int64  `orm:"pk;auto"`
	Repo        string `orm:"column(repo_name);size(256)" description:"仓名称"`
	PackageName string `orm:"column(package_name);size(256)" description:"第三方包名称"`
	Version     string `orm:"size(64);column(version);index" description:"版本号"`
	OriginUrl   string `orm:"size(512);column(origin_url)" description:"gitee上的地址"`
	Status      int8   `orm:"default(1);column(status)" description:"1:正常;2:已删除"`
	CpeName     string `orm:"type(text);column(cpe_name)" description:"cpe的名称"`
	MarkBit     int8   `orm:"default(1);column(mark_bit)" description:"1:正常;2:已删除"`
	Owner       string `orm:"size(512);column(owner);index" description:""`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type MindSporeBrandTags struct {
	Id          int64  `orm:"pk;auto"`
	PackageName string `orm:"column(package_name);size(256)" description:"包名称"`
	Brand       string `orm:"size(64);column(brand);index" description:"分支信息"`
	Tags        string `orm:"size(64);column(tags);index" description:"tags信息"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type OriginUpstreamRecord struct {
	CveId         int64  `orm:"pk;auto;column(cve_record_id)"`
	Ids           string `orm:"size(256);column(cve_un_ids)" description:" 唯一编号,根据此字段去重数据, 唯一识别码，可以填cve编号"`
	CveNum        string `orm:"size(256);column(cve_num);index" description:"cve编号"`
	UpdateType    string `orm:"size(32);column(update_type);" description:"数据上传类型：insert, update, delete"`
	CvePackName   string `orm:"size(512);column(cve_packname);null" description:"Cve在上游对应的包名"`
	PackName      string `orm:"size(512);column(git_packname);index;null" description:"Cve对应的openEuler包名称(或者影响的包名)"`
	Title         string `orm:"type(text);column(cve_title);null" description:"标题"`
	AffectProduct string `orm:"size(512);column(affect_porduct);null" description:"Cve影响的组件, 对应"`
	CnnvdID       string `orm:"size(256);column(cnnvd_id);null" description:"Cnnvd_id"`
	CnvdID        string `orm:"size(256);column(cnvd_id);null" description:"Cnvd_id"`
	PublishedDate string `orm:"size(32);column(published_date);null" description:"漏洞发布日期"`
	FirstPerTime  string `orm:"size(32);column(first_per_time)" description:"cve首次披露时间"`
	FirstGetTime  string `orm:"size(32);column(first_get_time)" description:"cve受影响后首次感知时间"`
	VulStatus     string `orm:"size(64);column(vul_status);null" description:"漏洞状态，REJECT, DISPUTED"`
	Status int8 `orm:"default(0);column(cve_status)" description:"0:cve新增;1:数据已变化；
							2：数据已处理；3：错误数据；4：版本信息错误；5：cve年份不符合要求;6:低可信度数据已发邮件"`
	AffectedScope string `orm:"size(512);column(affected_scope);null" description:"影响范围推理"`
	Version       string `orm:"size(64);column(version);index" description:"包对应的版本号"`
	AttackLink    string `orm:"size(512);column(attack_link);null" description:"攻击链路推理"`
	IsExit        int8   `orm:"default(1);column(is_exit)" description:"1: 当前包对应在src-openEuler有对应仓库; 0: 无;2:临时值"`
	Credibility int `orm:"default(0);column(credibility_level)" description:"0:包名、版本号都是漏洞库原始数据;
																			1:包名通过别名匹配、版本号为漏洞库原始数据;
																			2:包名版本号都通过漏洞描述获取;
																			3:包名通过漏洞描述获取并通过别名匹配、版本号为漏洞描述获取;
																			4:包名版本号通过SA获取、版本号为修复版本号、修复版本以下都视为受影响版本;
																			5:包名版本号通过SA获取并通过别名匹配、版本号为修复版本号、修复版本以下都视为受影响版本;
																			6:版本号未匹配、包名通过以上任意方式匹配、可信度最低"`
	OrgData    string `orm:"type(text);column(org_data);null" description:"原始数据"`
	CreateTime string `orm:"size(32);column(create_time)"`
	SysStatus int8 `orm:"default(0);column(sys_status)" description:"0:cve新增;1:数据已变化；
						2：数据已处理；3：错误数据；4：版本信息错误；5：cve年份不符合要求;6:低可信度数据已发邮件"`
	ErrDesc string `orm:"null;type(text);column(err_desc);null" description:"数据同步失败的错误描述"`
}

type OpenLookengSecurityReviewer struct {
	Id        int64  `orm:"pk;auto"`
	NameSpace string `orm:"unique" description:"码云空间地址"`
	Status    int8   `orm:"default(0);column(status)" description:"0: 全部；1:审核人"`
}

type OpenLookengYaml struct {
	Id          int64  `orm:"pk;auto"`
	Repo        string `orm:"column(repo_name);size(256)" description:"仓名称"`
	PackageName string `orm:"column(package_name);size(256)" description:"第三方包名称"`
	Version     string `orm:"size(64);column(version);index" description:"版本号"`
	OriginUrl   string `orm:"size(512);column(origin_url)" description:"gitee上的地址"`
	Status      int8   `orm:"default(1);column(status)" description:"1:正常;2:已删除"`
	CpeName     string `orm:"type(text);column(cpe_name)" description:"cpe的名称"`
	MarkBit     int8   `orm:"default(1);column(mark_bit)" description:"1:正常;2:已删除"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type IssueCommunityStatistics struct {
	Id          int64  `orm:"pk;auto"`
	CveId       int64  `orm:"column(cve_id)"`
	CveNum      string `orm:"size(256);column(cve_num);unique" description:"cve编号"`
	Repo        string `orm:"column(repo_name);size(256)" description:"仓名称"`
	PackageName string `orm:"column(package_name);size(256)" description:"组件名称"`
	Version     string `orm:"size(64);column(version)" description:"版本号"`
	ExistFlag   int8   `orm:"default(1);column(exist_flag)" description:"1:openEuler;2:openGauss;3:MindSpore;4:openLooKeng"`
	CreateTime  string `orm:"size(32);column(create_time)"`
	UpdateTime  string `orm:"size(32);column(update_time);null"`
	DeleteTime  string `orm:"size(32);column(delete_time);null"`
}

type CommunityYamlConfig struct {
	Id             int64  `orm:"pk;auto"`
	TableName      string `orm:"column(table_name);size(512)" description:"表名称"`
	OrganizationID int8   `orm:"default(1);column(organizate_id)" description:"默认值为:1,1:来源openEuler;2:来源opengauss;3:来源mindspore;4:来源openLooKeng"`
}

type IssueDeleteRecord struct {
	IssueDeleteId  int64  `orm:"pk;auto;column(id)"`
	IssueId        int64  `orm:"column(issue_id)" description:"issue的id"`
	IssueNum       string `orm:"size(64);column(issue_num)" description:"issue编号"`
	CveNum         string `orm:"size(256);column(cve_num);index" description:"cve编号"`
	OrganizationID int8   `orm:"default(1);column(organizate_id)" description:"默认值为:1,1:来源openEuler;2:来源opengauss;3:来源mindspore;4:来源openLooKeng"`
	DelAssignee    string `orm:"size(128);column(issue_assignee)" description:"issue所属责任人"`
	IssueLabel     string `orm:"size(256);column(issue_label)" description:"issue标签, CVE/FIXED, CVE/UNFIXED"`
	Owner          string `orm:"size(128);column(owner)" description:"仓库地址"`
	Repo           string `orm:"size(512);column(repo)" description:"仓库路径"`
	DeleteTime     string `orm:"size(32);column(delete_time);null"`
}

func CreateDb() bool {
	BConfig, err := config.NewConfig("ini", "conf/app.conf")
	if err != nil {
		logs.Error("config init error:", err)
		return false
	}
	prefix := BConfig.String("mysql::dbprefix")
	InitdbType, _ := beego.AppConfig.Int("initdb")
	if InitdbType == 1 {
		orm.RegisterModelWithPrefix(prefix, new(OtherUser), new(AdminUser), new(VulnCenter),
			new(OpenEulerSA), new(Score), new(SecurityNotice), new(Package),
			new(IssueTemplate), new(ScoreRecord), new(IssueHooks),
			new(GitPackageTable), new(GitOpenEuler), new(GitPackageInfo),
			new(GitSubPack), new(GitOpenEulerTableRelate),
			new(SecurityReviewer), new(GitSubPackRequire),
			new(GitSubPackProvides), new(GitSubPackRequiredby),
			new(IpWhite), new(OriginUpstream), new(OriginUpstreamDesc),
			new(OriginUpstreamConfig), new(OriginUpstreamConfigNode),
			new(OriginUpstreamConfigNodeCpe), new(OriginUpstreamImpact), new(OriginUpstreamImpactScore),
			new(OriginUpstreamImpactScoreV3), new(OriginUpstreamImpactScoreV2),
			new(OriginUpstreamPoc), new(OriginUpstreamEvent),
			new(OriginUpstreamReference), new(OriginUpstreamVulType),
			new(OriginUpstreamFixSuggest), new(OriginUpstreamFixSuggestRefTag),
			new(OriginUpstreamFixSuggestRef), new(GiteOriginIssue),
			new(OriginExcel), new(ExportRecord), new(GitRepoGroups),
			new(GiteRepo), new(GiteRepoMember), new(GiteRepoBranch),
			new(PackageCpe), new(EmailList), new(IssueAssignee),
			new(IssueRepoWhitelist), new(IssueCreateRecord), new(OpenGussYaml),
			new(SpecIssueAssigness), new(SpecError), new(CvrfSaRecord),
			new(SaNumber), new(SaFileList), new(IssueStatisticsMailList),
			new(SaFileRecord), new(OpenGaussSiteList), new(OpenGaussCveList),
			new(OpenGaussGroup), new(OpenGaussPackage),
			new(IssueTemplateAssociation),
			new(OpenGaussDownloadFile), new(OpenGaussVersion),
			new(OpenGaussPlatform), new(OpenGaussListTemp),
			new(OpenEulerRepoOrigin), new(OpenGaussSecurityReviewer),
			new(MindSporeYaml), new(MindSporeSecurityReviewer),
			new(MindSporeBrandTags), new(OriginUpstreamRecord),
			new(OpenLookengSecurityReviewer), new(OpenLookengYaml),
			new(IssueCommunityStatistics), new(CommunityYamlConfig),
			new(IssueDeleteRecord), new(AuthTokenInfo),
		)
		logs.Info("table create success!")
		errosyn := orm.RunSyncdb("default", false, true)
		if errosyn != nil {
			logs.Error(errosyn)
		}
	}
	return true
}
